<?php
$this->breadcrumbs=array(
    Yii::t('site','Admin')=>array('/admin'),
    Yii::t('site','Import')=>array('/admin/import'),
    Yii::t('site','Generate Import Spec')
);
?>

<h1><?php echo CHtml::encode($importTitle); ?></h1>

<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'form',
    'enableAjaxValidation'=>false,
    'htmlOptions' => array(
        'enctype'=>'multipart/form-data'
    ),
)); ?>

<p class="note"><?php echo Yii::t('site','Fields with {marker} are required.',array('{marker}'=>'<span class="required">*</span>')); ?></p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model,'modelName'); ?>
        <?php echo $form->textField($model,'modelName'); ?>
        <?php echo $form->error($model,'modelName'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model,'firstColumnIndex'); ?>
        <?php echo $form->textField($model,'firstColumnIndex',array('size'=>4,'class'=>'centered')); ?>
        <?php echo $form->error($model,'firstColumnIndex'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model,'redirect'); ?>
        <?php echo $form->textField($model,'redirect'); ?>
        <?php echo $form->error($model,'redirect'); ?>
    </div>
    <?php if($model->code !== '' ) : ?>
    <div class="row">
        <?php echo $form->labelEx($model,'code'); ?>
        <?php echo $form->textArea($model,'code',array('cols'=>75,'rows'=>10)); ?>
        <?php echo $form->error($model,'code'); ?>
    </div>
    <?php endif; ?>
    <div class="row buttons">
        <?php $this->widget( 'application.extensions.button.DDButton',
			array(
				'title'=>Yii::t('site','Generate'),
				'linkTitle'=>Yii::t('site','Generate the spec for the selected table'),
				'formID' => 'form',
				'buttonType' => 'save'
		)); ?>
        <?php $this->widget( 'application.extensions.button.DDButton',
			array(
				'title'=>Yii::t('site','Reset'),
				'linkTitle'=>Yii::t('site','Reset the form data'),
				'formID' => 'form',
				'buttonType' => 'reset',
				'confirm' => Yii::t('site','Really reset this form?')
		)); ?>
        <?php $this->widget( 'application.extensions.button.DDButton',
			array(
				'title'=>Yii::t('site','Cancel'),
				'linkTitle'=>Yii::t('site','Cancel editing, back to list'),
				'formID' => 'form',
				'buttonType' => 'cancel',
				'confirm' => Yii::t('site','Really cancel uploading file?'),
				'url' => array('index')
		)); ?>
    </div>

<?php $this->endWidget(); ?>

</div><!-- form -->

